import React from 'react'
import {Button} from 'antd'
// import 'antd/dist/antd.css'
import './Life.less'

export default class Life extends React.Component{
    constructor(){
        super()
        this.state = {
            count:0
        }
    }
    render(){
        return <div>
            <h1 className="title">this is Life </h1>
            <p>点击次数:{this.state.count}</p>
            <button onClick={() => this.btnClick()}> 点我</button>
            <Button onClick={() => this.btnClick()}>antd 点击</Button>
        </div>
    }
    btnClick() {
        console.log('you clicked me!!')
        this.setState({
            count: this.state.count + 1
        })
    }
}